import { atomMap, store } from "./store";

export function getStore<TState = any>() {
  const models = {} as TState;
  Object.keys(atomMap).forEach((namespace) => {
    const atom = atomMap[namespace];
    const atomState = store.get(atom);
    models[namespace] = atomState;
  });
  return models;
}
